home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CTOOLS10.ARJ / STACKTST.C < prev    next >
C/C++ Source or Header  |  1991-12-31  |  554b  |  31 lines

  1. /****************************************************************************
  2.  
  3.     Filename    :    Teststac.c
  4.     Version        :    0.1b
  5.     Description    :    Test the stac maintenance macros.
  6.  
  7. ****************************************************************************/
  8.  
  9. #include <stdio.h>
  10. #include "stack.h"
  11.  
  12. stack_dcl(mystack,int,10);
  13.  
  14. void main(void)
  15. {
  16.     int i,j;
  17.     int item;
  18.  
  19.     for (i = 0; i < 12; i++)
  20.         push(mystack,i);
  21.  
  22.     j = stack_ele(mystack);
  23.  
  24.     j = popn(mystack,5);
  25.  
  26.     for (i = 0; i < 12; i++)
  27.         j = pop(mystack);
  28.  
  29.     j = stack_ele(mystack);
  30. }
  31.